﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="LoanProducts.aspx.cs" Inherits="LoanProducts" EnableEventValidation="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <script language="javascript" type="text/javascript">

    function Test3TextBox(minValSTR, maxValSTR, valueValSTR) {

        var elementMinVal = document.getElementById(minValSTR).value.replace(",", ".");
        var elementMaxVal = document.getElementById(maxValSTR).value.replace(",", ".");
        var elementValueVal = document.getElementById(valueValSTR).value.replace(",", ".");

        var minVal = parseFloat(elementMinVal);
        var maxVal = parseFloat(elementMaxVal);
        var valueVal = parseFloat(elementValueVal);
        
        if (minVal >= 0 && maxVal >= 0 && (valueVal == 0 || elementValueVal.length == 0)) 
        {
            return true;
        }
        else
            if (((elementMinVal.length == 0 && elementMaxVal.length == 0) || (minVal == 0 && maxVal == 0)) && valueVal > 0) 
            {
                return true;
            }

            return false;
    }  

    function penaltyFromPastDueAmount_CustomValidate(source, args) {
        args.IsValid = Test3TextBox('<% =penaltyFromPastDueAmountMin_TextBox.ClientID %>', '<% =penaltyFromPastDueAmountMax_TextBox.ClientID %>', '<% =penaltyFromPastDueAmountValue_TextBox.ClientID %>'); 
    }

    function gracePeriod_CustomValidate(source, args) {
        args.IsValid = Test3TextBox('<% =gracePeriodMinTextBox.ClientID %>', '<% =gracePeriodMaxTextBox.ClientID %>', '<% =gracePeriodValTextBox.ClientID %>');
    }

    function creditAmount_CustomValidate(source, args) {
        args.IsValid = Test3TextBox('<% =creditAmountMinTextBox.ClientID %>', '<% =creditAmountMaxTextBox.ClientID %>', '<% =creditAmountValTextBox.ClientID %>');
    }

    function percent_CustomValidate(source, args) {      
            args.IsValid = Test3TextBox('<% =percentMinTextBox.ClientID %>', '<% =percentMaxTextBox.ClientID %>', '<% =percentValTextBox.ClientID %>');        
    }

    function paymantsCount_CustomValidate(source, args) {
        args.IsValid = Test3TextBox('<% =paymantsCountMinTextBox.ClientID %>', '<% =paymantsCountMaxTextBox.ClientID %>', '<% =paymantsCountValTextBox.ClientID %>');
    }

    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">



    <asp:Panel ID="emptyPanel" runat="server"  Visible="false"></asp:Panel>

    <asp:Panel ID="productsListPanel" runat="server" visible="false" >
        <asp:button runat="server" ID="addNewProductButton" text="Adaugarea Unui nou Produs" onclick="addNewProductButton_Click"  CausesValidation="False"/>
        <hr />
        <asp:GridView ID="loanProductsGridView" runat="server" 
            EnableModelValidation="True" 
            AutoGenerateColumns="False" 
            CssClass="mGrid"
            PagerStyle-CssClass="pgr"
            AlternatingRowStyle-CssClass="alt"
            AllowPaging="True"         
            PageSize="10"
            onpageindexchanging="loanProductsGridView_PageIndexChanging" 
            onrowdeleting="loanProductsGridView_RowDeleting" 
            onselectedindexchanged="loanProductsGridView_SelectedIndexChanged" 
            onrowdatabound="loanProductsGridView_RowDataBound">
            <AlternatingRowStyle CssClass="alt" />
            <Columns>
                <asp:BoundField DataField="productID" HeaderText="ProductID" HtmlEncode="False" HeaderStyle-CssClass="HiddenColumn" ItemStyle-CssClass="HiddenColumn" />
                <asp:BoundField DataField="productName" HeaderText="Product Name" HtmlEncode="False" />
                <asp:BoundField DataField="productCode" HeaderText="Product Code"   HtmlEncode="False" /> 
                <asp:BoundField DataField="Percents_string" HeaderText="Procent"   HtmlEncode="False" />   
                <asp:BoundField DataField="paymentsCount_string" HeaderText="Nr. de rate posibile"   HtmlEncode="False" /> 
                <asp:BoundField DataField="preferentialPeriod_string" HeaderText="Perioada de gratie"   HtmlEncode="False" /> 
                
                <asp:TemplateField HeaderText="Delete">
                    <ItemTemplate>
                            <asp:Button ID="deleteButton" runat="server" CommandName="Delete" Text="Delete" OnClientClick="return confirm('Sunteti sigur ca vreti sa stergeti acest Produs?');" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerStyle CssClass="pgr" />
            <SelectedRowStyle BackColor="#CCCCFF" />
        </asp:GridView>
    </asp:Panel>

    <asp:HiddenField ID="selectedProductID_HiddenField" runat="server" />
    <asp:HiddenField ID="newProductSelectedHiddenField" runat="server" />

    <asp:Panel ID="detailsPanel" runat="server" visible="false">
    
        <div class="compactLeftColumn">
            <div class="module">
                <div class="moduleHeader">PRODUCT DETALII</div>
                <div class="module_content">   
                    <p>
                        <label> Denumire Product: </label>
                        <asp:TextBox ID="loanProdNameTextBox" runat="server" />                               
                    </p>
                    <p>
                        <label> Codul: </label>
                        <asp:TextBox ID="loanProdCodeTextBox" runat="server" />                                     
                    </p>
                    <p>
                        <label> Clacularea procentului din: </label>   
                        <asp:DropDownList ID="loanProdCalculatePercentFromDLL" runat="server" />                                 
                    </p>                    
                    
                    <br />
                    <label> Suma creditului: </label>
                    <br />
                    <div style="width:30%; float:left;">Min:</div>
                    <div style="width:30%; float:left;">Sau Valoarea:</div>
                    <div style="width:30%; float:left;">Max:</div>

                    <div style="width:30%; float:left;"><asp:TextBox ID="creditAmountMinTextBox" runat="server"  Width="50px"/></div>
                    <div style="width:30%; float:left;">
                        <asp:TextBox ID="creditAmountValTextBox" runat="server"  Width="50px"/>
                        <asp:CustomValidator ID="CustomValidator8" runat="server" 
                                ValidationGroup = "ProductDetails"
                                ErrorMessage="Introduceti va rog valorile MIN - MAX   sau  doar Valoarea Concreta" 
                                ControlToValidate="creditAmountValTextBox" 
                                ClientValidationFunction="creditAmount_CustomValidate" 
                                ValidateEmptyText="True" Display="None" ></asp:CustomValidator>
                        <ajax:ValidatorCalloutExtender runat="Server" ID="NReqE"  TargetControlID="CustomValidator8" />
                    </div>
                    <div style="width:30%; float:left;"><asp:TextBox ID="creditAmountMaxTextBox" runat="server"  Width="50px"/></div>
                    <div style="clear:both;"></div>
                     
   
                    <br />
                    <label> Procentul pentru perioada (%): </label>
                    <br />
                    <div style="width:30%; float:left;">Min:</div>
                    <div style="width:30%; float:left;">Sau Valoarea:</div>
                    <div style="width:30%; float:left;">Max:</div>

                    <div style="width:30%; float:left;"><asp:TextBox ID="percentMinTextBox" runat="server"  Width="50px"/></div>
                    <div style="width:30%; float:left;">
                        <asp:TextBox ID="percentValTextBox" runat="server"  Width="50px"/>
                        <asp:CustomValidator ID="percentCustomValidator" runat="server" 
                            ValidationGroup = "ProductDetails"
                            ErrorMessage="Introduceti va rog valorile MIN - MAX   sau  doar Valoarea Concreta" 
                            ControlToValidate="percentValTextBox" 
                            ClientValidationFunction="percent_CustomValidate" 
                            ValidateEmptyText="True" Display="None" ></asp:CustomValidator>
                        <ajax:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender1"  TargetControlID="percentCustomValidator" />
                    </div>
                    <div style="width:30%; float:left;"><asp:TextBox ID="percentMaxTextBox" runat="server"  Width="50px"/></div>
                    <div style="clear:both;"></div>

                    <p>
                        <label> Perioada minima de achitare a dobinzii: </label>
                        <asp:DropDownList ID="loanProductMinimPercentPeriodDLL" runat="server">
                        </asp:DropDownList>
                    </p>
                </div>
            </div>
        </div>

        <div class="compactCenterLeftColumn">
            <div class="module">
                <div class="moduleHeader">PRODUCT DETALII</div>
                <div class="module_content">   

                    <label> Perioada de gratie: </label>
                    <br />
                    <div style="width:30%; float:left;">Min:</div>
                    <div style="width:30%; float:left;">Sau Valoarea:</div>
                    <div style="width:30%; float:left;">Max:</div>

                    <div style="width:30%; float:left;"><asp:TextBox ID="gracePeriodMinTextBox" runat="server" Width="50px" /></div>
                    <div style="width:30%; float:left;">
                       <asp:TextBox ID="gracePeriodValTextBox" runat="server" Width="50px" />
                        <asp:CustomValidator ID="CustomValidator7" runat="server" 
                            ValidationGroup = "ProductDetails"
                            ErrorMessage="Introduceti va rog valorile MIN - MAX   sau  doar Valoarea Concreta" 
                            ControlToValidate="gracePeriodValTextBox" 
                            ClientValidationFunction="gracePeriod_CustomValidate" 
                            ValidateEmptyText="True" Display="None"></asp:CustomValidator>
                        <ajax:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender2"  TargetControlID="CustomValidator7" />
                    </div>
                    <div style="width:30%; float:left;"><asp:TextBox ID="gracePeriodMaxTextBox" runat="server" Width="50px"/></div>
                    <div style="clear:both;"></div>

                    <br />
                    <label> Nr. de rambursari:  </label>
                    <br />
                    <div style="width:30%; float:left;">Min:</div>
                    <div style="width:30%; float:left;">Sau Valoarea:</div>
                    <div style="width:30%; float:left;">Max:</div>

                    <div style="width:30%; float:left;"><asp:TextBox ID="paymantsCountMinTextBox" runat="server"  Width="50px"/></div>
                    <div style="width:30%; float:left;">
                        <asp:TextBox ID="paymantsCountValTextBox" runat="server"  Width="50px"/>
                        <asp:CustomValidator ID="CustomValidator10" runat="server" 
                            ValidationGroup = "ProductDetails"
                            ErrorMessage="Introduceti va rog valorile MIN - MAX   sau  doar Valoarea Concreta" 
                            ControlToValidate="paymantsCountValTextBox" 
                            ClientValidationFunction="paymantsCount_CustomValidate" 
                            ValidateEmptyText="True" Display="None" ></asp:CustomValidator>
                        <ajax:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender3"  TargetControlID="CustomValidator10" />
                    </div>
                    <div style="width:30%; float:left;"><asp:TextBox ID="paymantsCountMaxTextBox" runat="server"  Width="50px"/></div>
                    <div style="clear:both;"></div>

           

                    <p>
                        <label> Calcularea penalitatii: </label>
                        <asp:DropDownList ID="calculatePenaltyFromDDL" runat="server"> </asp:DropDownList>
                    </p>
                    
             
                    <br />
                    <label> Valoarea penalitatii (in procente pe zi):  </label>
                    <br />
                    <div style="width:30%; float:left;">Min:</div>
                    <div style="width:30%; float:left;">Sau Valoarea:</div>
                    <div style="width:30%; float:left;">Max:</div>

                    <div style="width:30%; float:left;"><asp:TextBox ID="penaltyFromPastDueAmountMin_TextBox" runat="server" Enabled="false"  Width="50px"/></div>
                    <div style="width:30%; float:left;">
                        <asp:TextBox ID="penaltyFromPastDueAmountValue_TextBox" runat="server"  Width="50px"/>
                        <asp:CustomValidator ID="CustomValidator2" runat="server" 
                        ErrorMessage="Introduceti va rog valorile MIN - MAX   sau  doar Valoarea Concreta" 
                        ControlToValidate="penaltyFromPastDueAmountValue_TextBox" 
                        ClientValidationFunction="penaltyFromPastDueAmount_CustomValidate" 
                        ValidateEmptyText="true"
                        ValidationGroup = "ProductDetails" Display="None" ></asp:CustomValidator> 
                        <ajax:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender4"  TargetControlID="CustomValidator2" />  
                    </div>
                    <div style="width:30%; float:left;"><asp:TextBox ID="penaltyFromPastDueAmountMax_TextBox" runat="server"  Enabled="false"  Width="50px"/></div>
                    <div style="clear:both;"></div>                                                   
                                      
                </div>
            </div>
        </div>

        <div class="RightColumn">
            <div class="module">
                <div class="moduleHeader">Partea contabilitatii</div>
                <div class="module_content">   

                    <asp:UpdatePanel runat="server" ID="accountingUpdatePanel">
                        <ContentTemplate>
                            <asp:RadioButton ID="accountingNoneRadioButton" runat="server" Text="None"  AutoPostBack="true" OnCheckedChanged="accountingNoneRadioButton_CheckedChanged" Checked="true" />
                            &nbsp;  &nbsp;  
                            <asp:RadioButton ID="accountingCashRadioButton" runat="server" Text="Cash"  AutoPostBack="true" OnCheckedChanged="accountingCashRadioButton_CheckedChanged" Checked="false" />
                            &nbsp;  &nbsp;  
                            <asp:RadioButton ID="accountingAccuralRadioButton" runat="server" Text="Accrual (periodic)"  AutoPostBack="true" OnCheckedChanged="accountingAccuralRadioButton_CheckedChanged"  Checked="false"/>
                            &nbsp;  &nbsp;  
                            <asp:RadioButton ID="accountingAccuralUpfrontRadioButton" runat="server" Text="Accrual (upfront)"  AutoPostBack="true" OnCheckedChanged="accountingAccuralUpfrontRadioButton_CheckedChanged"  Checked="false"/>
                            
                            <asp:Panel ID="cashPanel" runat="server" Visible="false">
                                   <h4>Assets</h4>
                                    <table>
                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label1" runat="server">Fund source</asp:Label> </td>
                                            <td style="width:20px"><asp:Image ID="fundSourceAccountIdImage" runat="server"  ToolTip="an Asset account(typically Bank or cash) that is debited during repayments/payments an credited using disbursals." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"> <asp:DropDownList ID="cash_fundSourceAccountDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> <asp:Label ID="Label2" runat="server">Loan portfolio</asp:Label></td>
                                            <td style="width:20px"><asp:Image ID="Image1" runat="server"  ToolTip="an Asset account that is debited during disbursement and credited during principal repayment/writeoff." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"><asp:DropDownList ID="cash_loanPortfolioAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                        </tr>
                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label5" runat="server">Transfer in suspense</asp:Label></td>
                                            <td style="width:20px"><asp:Image ID="Image4" runat="server"  ToolTip="an Asset account that is used a suspense account for tracking portfolios of loans under transfer." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"><asp:DropDownList ID="cash_transferInSuspenceDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>                
                                        </tr>
                                    </table>

                                    <h4>Income</h4>
                                    <table>
                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label3" runat="server">Income from Interest</asp:Label> </td>
                                            <td style="width:20px"><asp:Image ID="Image2" runat="server"  ToolTip="an Income account that is credited during interest payment." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"> <asp:DropDownList ID="cash_interestOnLoanAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> <asp:Label ID="Label4" runat="server">Income from fees</asp:Label></td>
                                            <td style="width:20px"><asp:Image ID="Image3" runat="server"  ToolTip="an Income account which is credited when a fee is paid by account holder on this account." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"><asp:DropDownList ID="cash_incomeFromFeeAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                        </tr>
                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label6" runat="server">Income from penalties</asp:Label></td>
                                            <td style="width:20px"><asp:Image ID="Image5" runat="server"  ToolTip="an Income account, which is credited when a penalty is paid by account holder on this account." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"><asp:DropDownList ID="cash_incomeFromPenaltyAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> <asp:Label ID="Label7" runat="server">Income from Recovery Repayments</asp:Label></td>
                                            <td style="width:20px"><asp:Image ID="Image6" runat="server"  ToolTip="an Income account that is credited during Recovery Repayment." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"><asp:DropDownList ID="cash_incomeFromRecoveryAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>            
                                        </tr>
                                    </table>
	                   
	                                <h4>Expenses</h4>
                                    <table>
                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label8" runat="server">Loses written off</asp:Label> </td>
                                            <td style="width:20px"><asp:Image ID="Image7" runat="server"  ToolTip="An expense account that is debited on principal writeoff (also debited in the events of interest, fee and penalty written-off in case of accrual based accounting.)" ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"> <asp:DropDownList ID="cash_writeOffAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>    
                                        </tr>
                                        <tr>
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>    
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>            
                                        </tr>
                                    </table>
                        
                                    <h4>Liabilities</h4>
                                    <table>
                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label9" runat="server">Over payment liability</asp:Label> </td>
                                            <td style="width:20px"><asp:Image ID="Image8" runat="server"  ToolTip="an Liability account that is credited on overpayments and credited when refunds are made to client." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"> <asp:DropDownList ID="cash_overpaymentLiabilityAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>    
                                        </tr>
                                        <tr>
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>   
                                            <td style="width:30px"></td> 
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>            
                                        </tr>
                                    </table>       

                            </asp:Panel>

                            <asp:Panel ID="accuralPanel"  runat="server" Visible="false">
                                    <h4>Assets</h4>
                                    <table>
                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label10" runat="server">Fund source</asp:Label> </td>
                                            <td style="width:20px"><asp:Image ID="Image9" runat="server"  ToolTip="an Asset account(typically Bank or cash) that is debited during repayments/payments an credited using disbursals." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"> <asp:DropDownList ID="accural_fundSourceAccountDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> <asp:Label ID="Label11" runat="server">Loan portfolio</asp:Label></td>
                                            <td style="width:20px"><asp:Image ID="Image10" runat="server"  ToolTip="an Asset account that is debited during disbursement and credited during principal repayment/writeoff." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"><asp:DropDownList ID="accural_loanPortfolioAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                        </tr>
                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label19" runat="server">Interest Receivable</asp:Label></td>
                                            <td style="width:20px"><asp:Image ID="Image18" runat="server"  ToolTip="an Asset account that is used to accrue interest." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"><asp:DropDownList ID="accural_receivableInterestAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> <asp:Label ID="Label20" runat="server">Fees Receivable</asp:Label> </td>
                                            <td style="width:20px"><asp:Image ID="Image19" runat="server"  ToolTip="an Asset account that is used to accrue fees" ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"><asp:DropDownList ID="accural_receivableFeeAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>                
                                        </tr>

                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label21" runat="server">Penalties Receivable</asp:Label></td>
                                            <td style="width:20px"><asp:Image ID="Image20" runat="server"  ToolTip="label.tooltip.receivablepenalties" ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"><asp:DropDownList ID="accural_receivablePenaltyAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"> </td>
                                            <td style="width:25%">  </td>
                                            <td style="width:20px"> </td>
                                            <td style="width:25%">  </td>                
                                        </tr>
                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label12" runat="server">Transfer in suspense</asp:Label></td>
                                            <td style="width:20px"><asp:Image ID="Image11" runat="server"  ToolTip="an Asset account that is used a suspense account for tracking portfolios of loans under transfer." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"><asp:DropDownList ID="accural_transferInSuspenceDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>                
                                        </tr>
                                    </table>

                                    <h4>Income</h4>
                                    <table>
                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label13" runat="server">Income from Interest</asp:Label> </td>
                                            <td style="width:20px"><asp:Image ID="Image12" runat="server"  ToolTip="an Income account that is credited during interest payment." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"> <asp:DropDownList ID="accural_interestOnLoanAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> <asp:Label ID="Label14" runat="server">Income from fees</asp:Label></td>
                                            <td style="width:20px"><asp:Image ID="Image13" runat="server"  ToolTip="an Income account which is credited when a fee is paid by account holder on this account." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"><asp:DropDownList ID="accural_incomeFromFeeAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                        </tr>
                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label15" runat="server">Income from penalties</asp:Label></td>
                                            <td style="width:20px"><asp:Image ID="Image14" runat="server"  ToolTip="an Income account, which is credited when a penalty is paid by account holder on this account." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"><asp:DropDownList ID="accural_incomeFromPenaltyAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> <asp:Label ID="Label16" runat="server">Income from Recovery Repayments</asp:Label></td>
                                            <td style="width:20px"><asp:Image ID="Image15" runat="server"  ToolTip="an Income account that is credited during Recovery Repayment." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"><asp:DropDownList ID="accural_incomeFromRecoveryAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>            
                                        </tr>
                                    </table>
	                   
	                                <h4>Expenses</h4>
                                    <table>
                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label17" runat="server">Loses written off</asp:Label> </td>
                                            <td style="width:20px"><asp:Image ID="Image16" runat="server"  ToolTip="An expense account that is debited on principal writeoff (also debited in the events of interest, fee and penalty written-off in case of accrual based accounting.)" ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"> <asp:DropDownList ID="accural_writeOffAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>    
                                        </tr>
                                        <tr>
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>    
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>            
                                        </tr>
                                    </table>
                        
                                    <h4>Liabilities</h4>
                                    <table>
                                        <tr>
                                            <td style="width:25%"> <asp:Label ID="Label18" runat="server">Over payment liability</asp:Label> </td>
                                            <td style="width:20px"><asp:Image ID="Image17" runat="server"  ToolTip="an Liability account that is credited on overpayments and credited when refunds are made to client." ImageUrl="~/App_Images/question.png" Width="16px" Height="16px" /></td>
                                            <td style="width:25%"> <asp:DropDownList ID="accural_overpaymentLiabilityAccountIdDDL" runat="server" Width="100%"></asp:DropDownList></td>
                                            <td style="width:30px"></td>
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>    
                                        </tr>
                                        <tr>
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>   
                                            <td style="width:30px"></td> 
                                            <td style="width:25%"> </td>
                                            <td style="width:20px"></td>
                                            <td style="width:25%"></td>            
                                        </tr>
                                    </table>    
                            </asp:Panel>

                        </ContentTemplate>
                    </asp:UpdatePanel>


                                                           
                </div>
            </div>
        </div>
       
        <div class="clear">
        </div>
        <div class="centerBox" style="width:150px">
            <asp:Button ID="detailsLoanProductSaveButton" runat="server" Text="Save" onclick="detailsLoanProductSaveButton_Click"  ValidationGroup = "ProductDetails" />
            <asp:Button ID="detailsLoanProductCancelButton" runat="server" Text="Cancel" onclick="detailsLoanProductCancelButton_Click" CausesValidation="False" ValidationGroup = "ProductDetails" />
        </div>    

    </asp:Panel>




</asp:Content>

